<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
		.bg{
			text-decoration: none;
			font-size: 20px;
			color: darkcyan;
		}
		</style>
		<script src="../js/jquery-3.4.1.min.js"></script>
		<script>
			$(function(){
				//alert($("div a").prop("target"));
				//$("div a").addClass("bg").attr("target","_blank").attr("href","https://www.baidu.com").text("百度");
				
				
				$("#btn").click(function(){
					$("div a").addClass("bg").attr("target","_blank").attr("href","https://www.baidu.com").text("百度");
				});
				$("#btnHide").click(function(){
					$("div").hide();
				});
			});
		</script>
	</head>
	<body>
		<div>
			<a href="http://www.bdqn.cn">BDQN</a>
		</div>
		<input type="button" value="改变链接的样式" id="btn"/>
		
		<input type="button" value="隐藏" id="btnHide"/>
	</body>
</html>
